package com.example.designpattern.behavioral.command.command;

import com.example.designpattern.behavioral.command.component.Tv;
import lombok.AllArgsConstructor;
import lombok.Data;

@AllArgsConstructor
@Data
public class TvOffCommand implements ICommand {

    private Tv tv;

    @Override
    public void execute() {
        tv.turnOffTv();
    }

    @Override
    public void undo() {
        tv.turnOnTv();
    }
}